#pragma once
#include <vector>
#include <memory>
#include <functional>
#include <transfer/ITransfer.h>

namespace ecarx::transfer::ipcp {

    class IPCPConn:public ITransfer{
        class NetIPCP;
        NetIPCP* mImpl;
        bool mIsExitStrMode;
        public:
        explicit IPCPConn();
        ~IPCPConn();
        //打开链接
        bool open() override;
        //关闭链接
        bool close() override;
        //将数据写到网络上
        bool write(const Signal &) override;
        const std::optional<Signal> read(const int32_t signalId) const override;
        NetState getState() override;
        void onSignalChanged(SignalChangeCallback && callback) override;
        void registerStateHandler(NetStateCallback && callback) override;
        bool enterStrMode() override;
        bool exitStrMode() override;

    };

}
